﻿<%@ Page Title="Danh sách bình luận" Language="C#" AutoEventWireup="true" CodeBehind="ArticleComment.aspx.cs" Inherits="VIT.Web.Admin.ArticleComment" %>
<%@ Register Assembly="VIT.Web.Controls" Namespace="VIT.Web.Controls" TagPrefix="VIT" %>

<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="<%=URLRoot %>Admin/Includes/VIT.js"></script>
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">    
    <form id="aspnetForm" runat="server">
    <div>
        <div class="toolbar">            
            <VIT:Submit ID="Delete" runat="server" Function="ArticleComment_Delete" ToolTip="Xóa" CssClass="icon-32-delete" BorderStyle="None" OnClick="Delete_Click" OnClientClick="return hasCheck('itemCheckbox','Vui lòng chọn bài viết để xóa.')  && confirm('Xóa bài viết được chọn');"/>
            <a href="<%=linkComponent("Article","ArticleList") %>"><img src="<%=URLRoot %>Admin/Includes/icons/icon-32-restore.png"/></a>
        </div>
    </div>
    <div class="clr"></div>

    <div>
        <table>
            <asp:ListView ID="ListView" runat="server">
                <LayoutTemplate>
                    <thead>
	                    <tr>
                            <th width="2%">#</th>
		                    <th width="2%">
			                    <input type="checkbox" name="toggle" id="toggle" onclick="checkAll('toggle', 'itemCheckbox')"/>
	                        </th>                    
		                    <th width="20%">Tên</th>
		                    <th>Nội dung</th>
                            <th width="20%">Ngày</th>
                            <th width="5%">ID</th>
	                    </tr>			
                    </thead>
                    <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
                </LayoutTemplate>
                    
                <ItemTemplate>
                    <tr class="row<%#Container.DataItemIndex%2 %>">
		                <td align="center"><%#Container.DataItemIndex%></td>
	                    <td align="center">
		                    <input type="checkbox" name="itemCheckbox" value="<%#Eval("Id")%>"/>
                        </td>
	                    <td align="justify"><%#Eval("Name")%></td>
	                    <td align="justify"><%#Eval("Description")%></td>
                        <td align="center"><%#Eval("Time")%></td>
		                <td align="center"><%#Eval("id")%></td>	
                    </tr>
                </ItemTemplate> 
            </asp:ListView>
        </table>
        <asp:DataPager ID="Pager" runat="server" PagedControlID="ListView" PageSize="20" onprerender="Pager_PreRender">
            <Fields>
                <asp:NextPreviousPagerField ShowFirstPageButton="True" ShowNextPageButton="False" FirstPageText="Trang đầu" PreviousPageText="<<" />
                <asp:NumericPagerField />
                <asp:NextPreviousPagerField ShowLastPageButton="True" ShowPreviousPageButton="False" LastPageText="Trang cuối" NextPageText=">>" />
            </Fields>
        </asp:DataPager>
    </div>
</form>
    <script type="text/javascript">
        $("#aside ul li#ArticleList").addClass("submenu-active");
    </script>
</asp:Content>
